package com.ruoyi.system.monitortask.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.monitortask.domain.MonitoringErr;
import com.ruoyi.system.monitortask.mapper.MonitoringErrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 监控任务错误表(monitor_task_err)表控制层
 *
 * @author zyy
 * @date 2024-06-22 11:32:53
 */
@RestController
@RequestMapping("/monitoringErr")
public class MonitoringErrController extends BaseController {

    @Autowired
    private MonitoringErrMapper monitoringErrMapper;


    /**
     * 分页查询所有数据
     *
     * @param monitorTaskErr 查询实体
     * @return 所有数据
     */
    @GetMapping("/list")
    public TableDataInfo list(MonitoringErr monitorTaskErr) {
        startPage();
        List<MonitoringErr> list =
                monitoringErrMapper.selectList(new LambdaQueryWrapper<MonitoringErr>().orderByDesc(MonitoringErr::getId));
        return getDataTable(list);
    }


}